ImageGear .NET v25.1 - Updated
ImGearRasterPage Constructor(Int32,Int32,ImGearColorSpace,Int32[],Boolean)




ImageGear.Core Assembly > ImageGear.Core Namespace > ImGearRasterPage Class > ImGearRasterPage Constructor : ImGearRasterPage Constructor(Int32,Int32,ImGearColorSpace,Int32[],Boolean)
Width of page in pixels.
Height of page in pixels.
Pixel's color space.
Channels depths of new page.
Indicates whether the pixel store should be allocated.
Initializes a new instance of the ImGearRasterPage class with provided attributes.
Syntax
'Declaration
 
Public Function New( _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal colorSpace As ImGearColorSpace, _
   ByVal channelDepths() As Integer, _
   ByVal allocatePixels As Boolean _
)
'Usage
 
Dim width As Integer
Dim height As Integer
Dim colorSpace As ImGearColorSpace
Dim channelDepths() As Integer
Dim allocatePixels As Boolean
 
Dim instance As New ImGearRasterPage(width, height, colorSpace, channelDepths, allocatePixels)
public ImGearRasterPage( 
   int width,
   int height,
   ImGearColorSpace colorSpace,
   int[] channelDepths,
   bool allocatePixels
)
public: ImGearRasterPage( 
   int width,
   int height,
   ImGearColorSpace colorSpace,
   int[]* channelDepths,
   bool allocatePixels
)
public:
ImGearRasterPage( 
   int width,
   int height,
   ImGearColorSpace colorSpace,
   array<int>^ channelDepths,
   bool allocatePixels
)

Parameters

width
Width of page in pixels.
height
Height of page in pixels.
colorSpace
Pixel's color space.
channelDepths
Channels depths of new page.
allocatePixels
Indicates whether the pixel store should be allocated.
Remarks
The ImGearPage is initialized with a set of image defining attributes. Optionally a store for pixels may also be allocated.

An exception may be thrown while constructing the page instance if incompatible image attributes are passed (e.g., ChannelDepths has length smaller than colors channels quantity in specified color space).

This constructor does not allocate a palette. After creating an indexed image the user should allocate a palette, initialize its entries, and attach it to the ImGearRasterPage's DIB. The Palette's length should be equal to 2^depth, where depth is bit depth of the indexed image.

See Also

Reference

ImGearRasterPage Class
ImGearRasterPage Members
Overload List